package com.tokenplus.thai.utils.analytics.bean

import com.tokenplus.thai.ProjectConfig
import com.tokenplus.thai.utils.UserStateUtil
import com.tokenplus.thai.utils.analytics.util.AnalyticsUtil

open class ParamBase(
    /** token */
    var token: String = "",
    /** userId */
    var userId: String = "",
    /** androidId */
    var androidId: String = "",
    /** advertId */
    var advertId: String = "",
    /** version */
    var version: String = "",
    /** product */
    var product: String = "",
    /** clientType */
    var clientType: String = "",
    /** aduid */
    var aduid: String = "",
    /** aduidPath */
    var aduidPath: String = "",
    /** 是否限制广告id，1是 0否 */
    var isLimitAdTrackingEnabled: String = "",
    /** 接口版本号 */
    var apiVersion: String = "v3"
) {
    init {
        this.token = UserStateUtil.mToken
        this.userId = UserStateUtil.mUserId
        this.androidId = AnalyticsUtil.getAndroidId()
        this.advertId = AnalyticsUtil.getAdId()
        this.isLimitAdTrackingEnabled = AnalyticsUtil.getAdEnabled().toString()
        this.aduid = AnalyticsUtil.getAdId()
        this.aduidPath = AnalyticsUtil.getAndroidId()
        this.version = ProjectConfig.appVersion.toString()
        this.product = ProjectConfig.product
        this.clientType = "ANDROID"
    }
}